package cn.deschen.designPattern.creational.builder.builders;

import cn.deschen.designPattern.creational.builder.entity.File;

/**
 * @Author hanbin_chen
 * @Description 文件抽象建造者
 * @Version V1.0.0
 */
public abstract class FileBuilder {

    protected File file = new File();
    abstract FileBuilder buildFileType();

    public FileBuilder buildFileName(String name) {
        file.setFileName(name);
        return this;
    }

    public FileBuilder buildFileSize(long size) {
        file.setFileSize(size);
        return this;
    }

    public FileBuilder buildFileContent(Object content) {
        file.setContent(content);
        return this;
    }

    protected File getFile() {
        return file;
    }
}
